import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import A from '../components/A'
import B from '../components/B'
import C from '../components/C'
import E from '../components/E'
import F from '../components/F'

Vue.use(Router)
//配置路由  显示组件
export default new Router({
  routes: [
  	{
  		path:'/',
  		redirect:'/1'
  	},//重定向
    {
      path:'/1',
      component: A
    },
    {
      path: '/2',
      component: B,
      //子路由
      children:[{
      	path:'4',
      	component:E
      },{
      	path:'5',
      	component:F
      }]
    },
    {
      path: '/3',
      component: C
    }
  ]
})
